package com.bailan.foreat.controller;


import com.bailan.foreat.entity.StoreType;
import com.bailan.foreat.service.StoreTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:44
 */
@Controller
@RequestMapping("/storeType")
public class StoreTypeController {

    @Autowired
    StoreTypeService storeTypeService;

    @RequestMapping("all")
    @ResponseBody
//    @Cacheable(value = "storeType",key = "#root.targetClass+#root.methodName")
    public List<StoreType> all() {
        List<StoreType> storeTypeList = storeTypeService.list();
        return storeTypeList;
    }

}

